Page({
  data: {
    cd_item: []
  },
  onLoad:function(option){
    var that = this;
      wx.request({
        url: 'http://127.0.0.1:8080/queryComponentGoods',
        data: { viewId: option.viewId },//url传值
        header: {
          'content-type': 'application/json'
        },
        success: function (res) {
          that.setData({
            cd_item: res.data.componentGoodsList
          })
        }
      })
  }
})